package com.laoxu.test.rbacdemo.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.laoxu.test.rbacdemo.model.SysDeptUsers;
import com.laoxu.test.rbacdemo.model.SysUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author laoxu
 * @since 2020-08-09
 */
public interface SysUserMapper extends BaseMapper<SysUser> {
    IPage<SysUser> findUserDetail(Page page, @Param("user") SysUser user);

    /**
     * 获取单个用户详情
     *
     * @param username 用户名
     * @return 用户信息
     */
    SysUser findDetail(String username);
    String findSubordinates(@Param("deptId")Long deptId);

    List<SysDeptUsers> findSubordinatesMap();
}
